﻿using Abp.Domain.Entities;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Batman.Cms.Domains
{
    [Table("OpenAccount")]
    public class OpenAccount : Entity<int>
    {
        [Required]
        public string Name { get; set; }

        public string AppId { get; set; }

        public string Secret { get; set; }

        [Required]
        public OpenAccountPlatform Platform { get; set; }

        [Required]
        public string PlatformName { get { return Platform.ToString(); } set { value = Platform.ToString(); } }

        public string Description { get; set; }

        [Required]
        public OpenAccountStatus Status { get; set; }

        [Required]
        public string StatusName { get { return Status.ToString(); } set { value = Status.ToString(); } }

        public string Token { get; set; }

        public DateTime? ExpiredAt { get; set; }

        public string ServiceNo { get; set; }
    }
}
